package com.zhuna.www.po;

import com.zhuna.www.constant.RechargeStatus;

import java.time.LocalDateTime;

public class RechargeRecord {
    private Integer recordId;      // 记录ID（对应数据库主键）
    private Integer userId;       // 用户ID
    private Double amount;        // 充值金额
    private String transactionId; // 交易流水号（唯一）
    private RechargeStatus status; // 充值状态（枚举）
    private LocalDateTime createdAt; // 创建时间

    public RechargeRecord() {
    }

    public RechargeRecord(Integer recordId, Integer userId, Double amount, String transactionId, RechargeStatus status) {
        this.recordId = recordId;
        this.userId = userId;
        this.amount = amount;
        this.transactionId = transactionId;
        this.status = status;
    }

    public Integer getRecordId() {
        return recordId;
    }

    public void setRecordId(Integer recordId) {
        this.recordId = recordId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public RechargeStatus getStatus() {
        return status;
    }

    public void setStatus(RechargeStatus status) {
        this.status = status;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public String toString() {
        return "RechargeRecord{" +
                "transactionId='" + transactionId + '\'' +
                ", status=" + status +
                ", createdAt=" + createdAt +
                ", amount=" + amount +
                '}';
    }
}
